import React, {} from 'react';
import {render} from 'react-dom';
import {ConfigProvider} from 'antd';
import zhCN from 'antd/lib/locale/zh_CN';
import moment from 'moment';
import 'moment/locale/zh-cn';
import Panel from "./pages/panel";
import './index.less';
import {HashRouter, Switch, Route} from "react-router-dom";

import Main from "./Main";
import Login from "./pages/login/index";

moment.locale('zh-cn');

const App = () => {

    return (
        <ConfigProvider locale={zhCN}>
            <HashRouter>
                <Switch>
                    <Route path="/panel" component={Panel}/>
                    <Route exact path="/login" component={Login}/>
                    <Route path="/" component={Main}/>
                </Switch>
            </HashRouter>
        </ConfigProvider>
    );
};

render(<App/>, document.getElementById('root'));